"""
协程：对生成器对象执行预激活操作就可以将生成器升级为协程
"""


def calc_avg():
    total, count = 0, 0
    avg_value = None
    while True:
        value = yield avg_value
        total += value
        count += 1
        avg_value = total / count


def main():
    gen = calc_avg()
    gen.send(None)  # next(gen)
    print(gen.send(int(input())))
    print(gen.send(int(input())))
    print(gen.send(int(input())))


if __name__ == '__main__':
    main()
